#include"Queue.h"

template<class T, class Container>
bool Queue<T, Container>::empty() const{
	return queue_.empty();
}

template<class T, class Container>
bool Queue<T, Container>::full() const {
	return false;
}

template<class T, class Container>
int Queue<T, Container>::size() const {
	return queue_.size();
}

template<class T, class Container>
bool Queue<T, Container>::push(T&& element) {
	bool isFull = full();
	if(!isFull)
		queue_.push(std::forward(element));
	return !isFull;
}

template<class T, class Container>
bool Queue<T, Container>::pop() {
	bool isEmpty = empty();
	if(!isEmpty)
		queue_.pop();
	return !isEmpty;
}

template<class T, class Container>
bool Queue<T, Container>::pop(T& element) {
	bool isEmpty = empty();
	if (!isEmpty) {
		element = std::move(queue_.front());
		queue_.pop();
	}
	return !isEmpty;
}

template<class T, class Container>
T& Queue<T, Container>::front() const {
	return queue_.front();
}

template<class T, class Container>
T& Queue<T, Container>::back() const {
	return queue_.back();
}